<!--  -->
<template>
  <div class="my-order">
    <!-- 头部导航 -->
    <van-nav-bar
      title="我的订单"
      fixed
      :z-index="999"
      @click-left="onClickLeft"
    >
      <template #left>
        <van-icon name="arrow-left" color="#ffffff" size="24" />
      </template>
      <template #right>
        <van-icon name="scan" color="#ffffff" size="24" />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
import { NavBar, Icon } from "vant";
export default {
  data() {
    return {};
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
  },
  components: {
    [NavBar.name]: NavBar,
    [Icon.name]: Icon,
  },
};
</script>
<style scoped>
.my-order {
  padding-top: 46px;
}
/* 头部导航 */
.van-nav-bar {
  background-color: #ff6a00;
}
.my-order >>> .van-nav-bar__title {
  color: #fff;
  font-size: 18px;
}
</style>